/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * explorarCotizaciones_celda.java
 *
 * Created on 01-jun-2011, 22:05:17
 */

package vista.cotizacion;

import java.awt.Color;

/**
 *
 * @author Administrador
 */
public class ExplorarCotizacionObra_celdaObras extends javax.swing.JPanel {

    private int id;
    
    /** Creates new form explorarCotizaciones_celda */
    public ExplorarCotizacionObra_celdaObras() {
        initComponents();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblNombreObra = new javax.swing.JLabel();
        lblCliente = new javax.swing.JLabel();
        lblFechas = new javax.swing.JLabel();

        lblNombreObra.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNombreObra.setText("(nroPedido) Nombre de la Obra");

        lblCliente.setText("Empresa Cliente");

        lblFechas.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N
        lblFechas.setText("fechaInicio / fechaFin");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                    .addComponent(lblNombreObra, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
                    .addComponent(lblFechas, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblNombreObra, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblCliente)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblFechas)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    public void setDatosObra(int id,String nombre)
    {
        lblNombreObra.setText("["+id+"] "+nombre);
    }


    public void setCliente(String cliente)
    {
        lblCliente.setText(cliente);
    }

    public void setFechaInicioyFin(String fechaInicio, String fechaFin)
    {
        lblFechas.setText(fechaInicio+" al "+fechaFin);
    }

    public void setSelected(boolean flag)
    {
        if(flag)
        {
            this.setBackground(new Color(112,112,112));
        }
        else
        {
            this.setBackground(new Color(245,252,255));
        }
    }



    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel lblCliente;
    private javax.swing.JLabel lblFechas;
    private javax.swing.JLabel lblNombreObra;
    // End of variables declaration//GEN-END:variables

}
